import request from '@/utils/request'
const api_name = '/admin/system/sysRole/'
export default {
    getPageList(page, limit, searchObj) {
        return request({
            url: `${api_name}${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    removeById(id) {
        return request({
            url: `${api_name}remove/${id}`,
            method: 'delete'
        })
    },
    saveRole(role) {
        return request({
            url: `${api_name}save`,
            method: 'post',
            data: role
        })
    },
    getById(id) {
        return request({
            url: `${api_name}findRoleById/${id}`,
            method: 'get'
        })
    }, updateRole(role) {
        return request({
            url: `${api_name}update`,
            method: 'post',
            data: role
        })
    }, batchRemove(ids) {
        return request({
            url: `${api_name}batchRemove`,
            method: 'delete',
            data: ids
        })
    },
}